<template>
	<view>
		<cu-custom :customStyle="{backgroundColor:'white',backgroundImage:'linear-gradient(45deg, #caff005e, #ff810073)'}" :isBack="true" :paddingHeight="80">
			<template #content>
				<view style="color:#555">新建项目</view>
			</template> 
		</cu-custom> 
		
		<u-cell-group :border="false">
			<u-cell title="项目名称">
				<template #value>
					<view style="margin-left: 10px;">
						<u--input
							placeholder="项目名称"
							border="surround"
							v-model="formData.title"
							maxlength="6"
						></u--input>
					</view>
				</template>
			</u-cell>
		</u-cell-group>
	
		<!-- 底部操作条 -->
		<view   style="height: 100rpx;position:fixed;bottom:0;border:solid 1rpx #eee;width:100%;display: flex;justify-content: space-between;background-color: white;">
			<view @click="onCancel" style="flex: 0 0 50%;padding:15px">
				<view style="color: red;display: flex;align-items: center;justify-content: center;">
					取消
				</view>
			</view>
			<view @click="onAddProject" style="flex: 0 0 50%;padding:15px;"
				:style="{backgroundColor:'#ffa200'}"
			>
				<view style="color:white;display: flex;align-items: center;justify-content: center;">
					{{'立即发布'}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formData:{
					title:''
				}
			}
		},
		methods: {
			async onAddProject(){
				let res = await this.$http.post('/manager/job/project/create',{
					formData:this.formData
				})
				
				console.log(res.data)
			}
		}
	}
</script>

<style>

</style>
